<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="UTF-8">
    <title>邦诺智付管理后台</title>
    <link rel="stylesheet" type="text/css" href="../../bangnuo/login/css/style2.0.css">
    <link rel="stylesheet" href="../../bangnuo/admin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../bangnuo/admin/style/admin.css" media="all">
    <script src="../../bangnuo/admin/layui/layui.all.js"></script>
    <script src="service/loginService.js" type="text/javascript"></script>

    <style type="text/css">
        ul li {
            font-size: 30px;
            color: #2ec0f6;
        }

        .tyg-div {
            z-index: -1000;
            float: left;
            position: absolute;
            left: 5%;
            top: 20%;
        }

        .tyg-p {
            font-size: 14px;
            font-family: 'microsoft yahei';
            position: absolute;
            top: 135px;
            left: 60px;
        }

        .tyg-div-denglv {
            z-index: 1000;
            float: right;
            position: absolute;
            right: 3%;
            top: 10%;
        }

        .tyg-div-form {
            background-color: #23305a;
            width: 300px;
            height: auto;
            margin: 120px auto 0 auto;
            color: #2ec0f6;
        }

        .tyg-div-form form {
            padding: 10px;
        }

        .tyg-div-form form input[type="text"] {
            width: 270px;
            height: 30px;
            margin: 25px 10px 0px 0px;
        }

        .tyg-div-form form button {
            margin-top: 25px;
            width: 260px;

            padding: 0;
            cursor: pointer;
            height: 44px;

            background: #2ec0f6;
            -moz-border-radius: 6px;
            -webkit-border-radius: 6px;
            border-radius: 6px;
            border: 1px solid #2ec0f6;
            -moz-box-shadow: 0 15px 30px 0 rgba(255, 255, 255, .25) inset, 0 2px 7px 0 rgba(0, 0, 0, .2);
            -webkit-box-shadow: 0 15px 30px 0 rgba(255, 255, 255, .25) inset, 0 2px 7px 0 rgba(0, 0, 0, .2);
            box-shadow: 0 15px 30px 0 rgba(255, 255, 255, .25) inset, 0 2px 7px 0 rgba(0, 0, 0, .2);
            font-family: 'PT Sans', Helvetica, Arial, sans-serif;
            font-size: 14px;
            font-weight: 700;
            color: #fff;
            text-shadow: 0 1px 2px rgba(0, 0, 0, .1);
            -o-transition: all .2s;
            -moz-transition: all .2s;
            -webkit-transition: all .2s;
            -ms-transition: all .2s;
        }
        #ul{
            height: 40px;
            text-align: center;
            padding: 0;
        }
    </style>

<body>
<div class="tyg-div">
    <ul>
        <li>让</li>
        <li>
            <div style="margin-left:20px;">数</div>
        </li>
        <li>
            <div style="margin-left:40px;">据</div>
        </li>
        <li>
            <div style="margin-left:60px;">改</div>
        </li>
        <li>
            <div style="margin-left:80px;">变</div>
        </li>
        <li>
            <div style="margin-left:100px;">生</div>
        </li>
        <li>
            <div style="margin-left:120px;">活</div>
        </li>
    </ul>
</div>
<div id="contPar" class="contPar">
    <div id="page1" style="z-index:1;">
        <div class="title0">邦诺智付管理后台</div>
        <div class="title1">旅游、交通、气象、公共安全、大数据</div>
        <div class="imgGroug">
            <ul>
                <img alt="" class="img0 png" src="../../bangnuo/login/img/page1_0.png">
                <img alt="" class="img1 png" src="../../bangnuo/login/img/page1_1.png">
                <img alt="" class="img2 png" src="../../bangnuo/login/img/page1_2.png">
            </ul>
        </div>
        <img alt="" class="img3 png" src="../../bangnuo/login/img/page1_3.jpg">
    </div>
</div>
<div class="tyg-div-denglv">

    <div class="tyg-div-form">
        <div class="layui-tab">
            <ul id="ul" class="layui-tab-title" style="background-color: white">

                <!--<li ><h4><a href="./admin.html">管理员登录</a></h4></li>-->
                <li ><h4><a href="./agent.html">代理商登录</a></h4></li>
                <li ><h4><a href="./commercial.html">商家登录</a></h4></li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <form action="">
                        <!--<p class="tyg-p">欢迎访问 邦诺智付</p>-->
                        <div style="margin:5px 0px; ">
                            <input type="text" name="adminUsername" id="adminUsername" placeholder="请输入账号..."/>
                        </div>
                        <br/>
                        <div style="margin:5px 0px;">
                            <input style="width: 270px; height: 30px;" id="adminPassword" name="adminPassword"
                                   type="password" placeholder="请输入密码..."/>
                        </div>
                        <div style="margin:5px 0px;">
                            <input type="text" id="verifyCode" name="verifyCode" style="width:150px;"
                                   placeholder="请输入验证码..."/>
                            <img src="/getCodeImg" id="codeImageButton" style="vertical-align:bottom;padding:5px" alt="验证码"/>
                        </div>
                        <button type="button" class="layui-btn layui-btn-primary" onclick="actions('0')">登录</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="../../bangnuo/login/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="../../bangnuo/login/js/com.js"></script>
<script type="text/javascript">
    function actions(type) {


        var adminEntity = {
            "username": $("#adminUsername").val(),
            "password": $("#adminPassword").val(),
            "verifyCode": $("#verifyCode").val(),
            "type": type
        }
        $.ajax({
            type: "post",
            url: "/login",
            contentType: "application/json;charset=UTF-8",
            data: JSON.stringify(adminEntity),
            async: true,
            success: function (data) {
                console.log("操作成功", data);
                if (data.success) {
                    window.location.href = '../index.html?';
                } else {
                    var src = "/getCodeImg?" + new Date().getTime();
                    $('#codeImageButton').attr("src", src);
                    alert(data.object.message);
                }
            }
        });
    }


    $("#codeImageButton").click(function () {
        console.log("验证码图片点击");
        var src = "/getCodeImg?" + new Date().getTime();
        $('#codeImageButton').attr("src", src);

    });

</script>
</html>